﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
 <?PHP
date_default_timezone_set('Asia/Bangkok');
?>


<html lang="en">
  <head>

<meta charset="utf-8">
<link type="text/css" href="css/smoothness/jquery-ui-1.8.24.custom.css" rel="Stylesheet" />  
	<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.24.custom.min.js"></script>
	<script src="ui/jquery.ui.core.js"></script>
	<script src="ui/jquery.ui.widget.js"></script>
	<script src="ui/jquery.ui.position.js"></script>
	<link  href="table.css" rel="Stylesheet"/>
	<script src="ui/jquery.ui.autocomplete.js"></script>
	<link rel="stylesheet" href="demos.css"/>
	<link  href="style.css" rel="Stylesheet"/>
        <script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.core.js"></script>
<script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.slide.js"></script>

	 <script>
	 var xx=1,xy=1,tabApply=1;//รับค่าเปลี่ยนช่องรับข้อมูล
	 var a=2,b=1,c=0,numc=0,numd=0,dd=0,ddOld=-1;
	 var userArr=new Array(10);
	 userArr[0]=new Array(10);
	 	 userArr[0][4]="เทคโนโลยีการยาง";
		userArr[0][3]="นาย";
	$(function () {
            
            
            

	//$("ul#navi_containTab > li").click(function(event){
	$(".tabNavi1").click(function(event){
			var menuIndex=$(this).index();
			//if(menuIndex=='1')
			//$("#navi_containTab ").append('<li class="tabNavix"> Tab Menu x </li>');
			//$("ul#detail_containTab > li:visible").hide('slide', {direction: 'left'}, 500,function(){			
			//c=a;  //สลับช่อง
			//a=b;  //สลับช่อง
			//b=c;  //สลับช่อง
			//tabApply=c;
			////$("ul#detail_containTab > li").eq(menuIndex).show('slide', {direction: 'right'}, 500)});
			//$(".detailContent"+a).hide('slide', {direction: 'left'}, 500,function(){			
			//$(".detailContent"+b).show('slide', {direction: 'right'}, 500)});
			setUser(menuIndex);
			changetab(menuIndex);
	});
	$("ul#navi_containTab2 > li").click(function(event){
	var menuIndex=$(this).index();
			dd++;
			$("#navi_containTab ").append("<li class='tabNavi1' stype='{display:none;}' onclick=' changetab(\""+dd+"\");'><div id=textTab"+dd+"> Tab Menu x </div></li>");
			$("#b").animate({left: "+=500"}, 2000);
			$("ul#navi_containTab2 > li").show('slide', {direction: 'left'}, 500);
			if(dd>ddOld)
			cleardata();
			
			
			$("#navi_containTab li").eq(dd).show('slide', {direction: 'left'}, 500);
			 userArr[dd]=new Array(10);
			 userArr[dd][4]="เทคโนโลยีการยาง";
		userArr[dd][3]="นาย";
			//userArr[dd][0]=document.getElementById("tags").value ;
			//userArr[dd][1]=document.getElementById("name_st").value ;
			//userArr[dd][2]=document.getElementById("sname_st").value ;
			//userArr[dd][3]=document.getElementById("Pre_st").value ;
			//userArr[dd][4]=document.getElementById("Se_class_st").value;
			//userArr[dd][5]=document.getElementById("idSubject1").value;
			//userArr[dd][6]=document.getElementById("idSubject2").value;
			//userArr[dd][7]=document.getElementById("idPro").value;
			//userArr[dd][8]=document.getElementById("idStu").value;
			changetab(dd);
	});


    $("#menuGroup").click(function() {
        alert("You clicked my <td>!" + $(this).index() + $(this).html() + 
              "My TR is:" + $(this).parent("tr").html());
        //get <td> element values here!!??
		$("#group").hide("slow");
		$("#i_containTab").show("slow");
    });

$("li").click(function () {
		//alert("yes");
    });
		var mybrowser=navigator.userAgent;   
    if(mybrowser.indexOf('MSIE')>0){   
		$("div.class_st select").hover(function(){
				$(this).width("auto");
		},function(event){
				 if(event.relatedTarget!=null){
					$(this).width(200); // กำหนดค่าให้เท่ากับความกว้างเริ่มต้นที่ต้องการ
				 }
				$("div.class_st select").bind("change blur",function(){
					$(this).width(200); // กำหนดค่าให้เท่ากับความกว้างเริ่มต้นที่ต้องการ
				});
		});
    }
		//$( "#tags" ).autocomplete({
		//	source: "datalive.php"
		
		//});
		$("input").keyup(function () {
      var value = $(this).val();
      //$("p").text(value);
	  var getId=$(this).attr("id");
	  if(getId=="tags")
	  	userArr[dd][5]=value;
	  else if(getId=="name_st"){
		userArr[dd][1]=value;
		$("#textTab"+dd).text(value);
	  }
		else if(getId=="sname_st")
		userArr[dd][2]=value;
		
		
    }).keyup();
	$("select").on("change", function(){
        //alert( this.value );
		 var value = $(this).val();
      //$("p").text(value);
	  var getId=$(this).attr("id");
	   if(getId=="Se_class_st")
	  	userArr[dd][4]=value;
	  else if(getId=="Pre_st")
		userArr[dd][3]=value;
    });
	
	
	
		$("#tags").keyup(function () {
			var str = $("#tags").val();
			userArr[dd][5]=str;
			if (str.length > 9||str==1) {
				var xmlhttp;
				// = 2;
				var txt,txtLog="",
				x,
				i,
				sex,
				subject;
				pic1 = new Image(16, 16);
				pic1.src = "loader.gif";
				$("#status").html('<img src="loader.gif" align="absmiddle">&nbsp;Checking ...');
				
				//document.getElementById("status").html='<img src="loader.gif" align="absmiddle">&nbsp;Checking availability...';
				if (str == "") {
					document.getElementById("txtHint").innerHTML = "";
					return;
				}
				
				if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp = new XMLHttpRequest();
				} else { // code for IE6, IE5
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp.onreadystatechange = function () {
					if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
						xmlDoc = xmlhttp.responseXML;
						var id1x = xmlDoc.getElementsByTagName("id1");
						var id1y = id1x[0].childNodes[0].nodeValue;
						if (id1y === "0") {
							$("#status").html('<input type="hidden" name="idHave" value="never">รหัสใหม่');
							userArr[dd][0]="newUser";
							document.getElementById("name_st").value = "";
							document.getElementById("sname_st").value = "";
							document.getElementById("Pre_st").selectedIndex = 0;
							document.getElementById("class_st").selectedIndex = 0;
							document.getElementById("Se_class_st").disabled = false;
							document.getElementById("sname_st").disabled = false;
							document.getElementById("Pre_st").disabled = false;
							document.getElementById("Se_class_st").disabled = false;
							if (xx == 1) {
							addSub();
								$("#box-table-addNPro").show("slow");
								$("#box-table-LPro").hide("slow");
								$("#box-table-Log").hide("slow");
								
								xx = 2;
							}
							txtLog="";
						} else {
							x = xmlDoc.getElementsByTagName("id1"); //name
							x2 = xmlDoc.getElementsByTagName("id2"); //class
							x3 = xmlDoc.getElementsByTagName("id3"); //sex/idtool
							x4 = xmlDoc.getElementsByTagName("id4"); //idstu
							x5 = xmlDoc.getElementsByTagName("id5");//idPro
							x6 = xmlDoc.getElementsByTagName("id6");
							x7 = xmlDoc.getElementsByTagName("id7");//dateEnd
							x8 = xmlDoc.getElementsByTagName("id8");//nameMac
							sex=preName(x3[0].childNodes[0].nodeValue);
							subject=Class(x2[0].childNodes[0].nodeValue );
							document.getElementById("name_st").value = x[0].childNodes[0].nodeValue;
							
							userArr[dd][0]=x5[0].childNodes[0].nodeValue;
							userArr[dd][1]=x[0].childNodes[0].nodeValue;
							$("#textTab"+dd).text(x[0].childNodes[0].nodeValue);
							userArr[dd][2]=x4[0].childNodes[0].nodeValue;
							userArr[dd][3]=x3[0].childNodes[0].nodeValue;
							userArr[dd][4]=x2[0].childNodes[0].nodeValue;
							document.getElementById("sname_st").value = x4[0].childNodes[0].nodeValue;
							document.getElementById("Pre_st1").selectedIndex = sex;
							document.getElementById("Se_class_st").selectedIndex = subject;
							document.getElementById("name_st").disabled = true;
							document.getElementById("sname_st").disabled = true;
							document.getElementById("Pre_st1").disabled = true;
							document.getElementById("Se_class_st").disabled = true;
							if(xy==1){
							var i,txtlog="",txtbutlog="",log=0,ii=1,idro="";
							var txtbutadd="<td> </td><td><input type='button' value='เพิ่มเติม' onclick='addSub();' ></td>",txtadd = "<table id='box-table-Pro' ><tr><td></td><td><b>รายวิชา</b></td><td><b>หัวหน้าโครงการวิจัย</b></td></tr>";
							for (i = 1; i < x5.length; i++) {
							if(x7[i-1].childNodes[0].nodeValue!="00"||x3[i].childNodes[0].nodeValue==" "){
								txtadd = txtadd + "<tr style='cursor:pointer;' onclick=\"$('#rad"+i+"').prop('checked',$('#rad"+i+"').is(':checked')? false:true);\">";
								txtadd = txtadd + "<td><input type='radio' id ='rad"+i+"' name='choid1' id='choid"+(ii+2)+"' value='"+(ii+2)+"'   ></td>";
								txtadd = txtadd + "<input type='hidden' name='subject' value='"+x[i].childNodes[0].nodeValue+"'>";
								txtadd = txtadd + "<input type='hidden' name='subject' value='"+x2[i].childNodes[0].nodeValue+"'>";
								txtadd = txtadd + "<input type='hidden' name='idPro[]' value='"+x5[i].childNodes[0].nodeValue+"'>";
								txtadd = txtadd + "<input type='hidden' name='idStu[]' value='"+x4[i].childNodes[0].nodeValue+"'>";
								txtadd = txtadd + "<td>" + x[i].childNodes[0].nodeValue + "</td>";
								txtadd = txtadd + "<td>" + x2[i].childNodes[0].nodeValue + "</td>";
								txtadd = txtadd + "</tr>";
								ii++;
								}
								else {
								
								if(i==1||idro!=x5[i].childNodes[0].nodeValue)
								txtlog = txtlog+"<table id='box-table-log' ><tr><td COLSPAN = '2'><b>รายวิชา:" + x[i].childNodes[0].nodeValue + "</b></td><td COLSPAN = '2'> <b>หัวหน้าโครงการวิจัย: " + x2[i].childNodes[0].nodeValue + "</b></td></tr><tr><td></td><td><b>ชื่อเครื่อง</b></td><td><b>เวลาบันทีกข้อมูล</b></td><td COLSPAN = '2'><b>สถานะ</b></td></tr>";
								txtlog=txtlog+"<tr style='cursor:pointer;' onclick=\"$('#che"+i+"').prop('checked',$('#che"+i+"').is(':checked')? false:true);\">"+"<td style='width:20px'><input type='checkbox' id ='che"+i+"' name='idtool[]' value='" + x3[i].childNodes[0].nodeValue + "'></td>" + "<td>" + x8[i-1].childNodes[0].nodeValue + "</td>"+ "<td>" + x6[i-1].childNodes[0].nodeValue + "</td>"+"<td>กำลังใช้    </td></tr>";
								//txt = txt + "<input type='hidden' name='idStu' value='" + x4[i].childNodes[0].nodeValue + "'>";
								txtbutlog="<td COLSPAN = '2'><img src='arrow_ltr.png'><input type='submit' value='log out' onclick='logout();' ></td><td><input type='button' value='เพิ่มเติม' onclick='addPro();' ></td>";
								$("#box-table-Mac ").hide("slow");
								//break;
								idro=x5[i].childNodes[0].nodeValue;
								log=1;
								txtLog="<input type='button' value='log out' onclick='addSub3();' >";
								}
							}
							txtadd = txtadd + "<tr>"+txtbutadd+"<td>"+txtLog+"</td></td></tr>";
							txtadd = txtadd + "</table>";
							document.getElementById('box-table-LPro').innerHTML = txtadd;
							if(log==1){
							txtlog = txtlog + "<tr>"+txtbutlog+"<td></td></tr>";
							txtlog = txtlog + "</table>";
							document.getElementById('box-table-Log').innerHTML = txtlog;
							$("#box-table-Log").show("slow");
							$("#box-table-LPro").hide("slow");
							}else{
							$("#box-table-LPro").show("slow");
							$("#box-table-Log").hide("slow");
							//การเพิ่มกลุ่ม
							$("#group").show("slow");
							var j = x5.length;
							var k=x4.length-x5.length;
							for(var ii =0;ii<k;ii++){
							$("#box-table-group ").append('<tr><td id="menuGroup" onclick=" listGroup(\''+x[j+ii].childNodes[0].nodeValue+'\'  ) ;">งานกลุ่ม รายวิชา:' + x3[j+ii].childNodes[0].nodeValue+' ชื่อวิชา: '+x4[j+ii].childNodes[0].nodeValue+'</td></tr>');
							//$("#box-table-group ").append('<tr><td id="menuGroup" onclick=" listGroup()";>งานกลุ่ม รายวิชา:' + x3[j+ii].childNodes[0].nodeValue+' ชื่อวิชา: '+x4[j+ii].childNodes[0].nodeValue+'</td></tr>');
							
							}
							}
							
							
							
							xy=2;
							}
							//document.getElementById("box-table-addNPro").style.display="inline";
							$("#status").html('<input type="hidden" name="idHave" value="ever">');
							//document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
						}
					}
				}
				xmlhttp.open("GET", "getuser2.php?q=" + str, true);
				xmlhttp.send();
				
			} else if (xx == 2||xy==2) {
			if(xx==2){
				$("#box-table-addNPro").show("slow");
				xx = 1;
				}
				document.getElementById("name_st").value = "";
				document.getElementById("sname_st").value = "";
				document.getElementById("Pre_st").selectedIndex = 0;
				document.getElementById("Se_class_st").selectedIndex = 0;
				document.getElementById("name_st").disabled = false;
				document.getElementById("sname_st").disabled = false;
				document.getElementById("Pre_st").disabled = false;
				document.getElementById("Se_class_st").disabled = false;
				//document.getElementById("box-table-addNPro").style.display="none";
				if(xy==2){
							//document.getElementById('box-table-Log').innerHTML = "";
							$("#box-table-Log").hide("slow");
							xy=1;
							}
			}
		});
		$("#name_st").keyup(function () {
			var str = $("#name_st").val();
			if (str.length > 3&& typeApply==3) {
				var xmlhttp;
				var txt,txtLog="",
				x,
				i,
				sex,
				subject;
				pic1 = new Image(16, 16);
				pic1.src = "loader.gif";
				$("#status").html('<img src="loader.gif" align="absmiddle">&nbsp;Checking ...');
				
				//document.getElementById("status").html='<img src="loader.gif" align="absmiddle">&nbsp;Checking availability...';
				if (str == "") {
					document.getElementById("txtHint").innerHTML = "";
					return;
				}
				
				if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp = new XMLHttpRequest();
				} else { // code for IE6, IE5
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp.onreadystatechange = function () {
					if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
						xmlDoc = xmlhttp.responseXML;
						var id1x = xmlDoc.getElementsByTagName("id1");
						var id1y = id1x[0].childNodes[0].nodeValue;
						if (id1y === "0") {
							$("#status").html('<input type="hidden" name="idHave" value="never">รหัสใหม่');
							userArr[dd][0]="newUser";
							//document.getElementById("name_st").value = "";
							document.getElementById("sname_st").value = "";
							document.getElementById("Pre_st").selectedIndex = 0;
							document.getElementById("Se_class_st").selectedIndex = 0;
							document.getElementById("name_st").disabled = false;
							document.getElementById("sname_st").disabled = false;
							document.getElementById("Pre_st").disabled = false;
							document.getElementById("Se_class_st").disabled = false;
							if (xx == 1) {
							addSub();
								$("#box-table-addNPro").show("slow");
								$("#box-table-LPro").hide("slow");
								$("#box-table-Log").hide("slow");
								
								xx = 2;
							}
							txtLog="";
						} else {
							x = xmlDoc.getElementsByTagName("id1"); //name
							x2 = xmlDoc.getElementsByTagName("id2"); //class
							x3 = xmlDoc.getElementsByTagName("id3"); //sex/idtool
							x4 = xmlDoc.getElementsByTagName("id4"); //idstu
							x5 = xmlDoc.getElementsByTagName("id5");//idPro
							x6 = xmlDoc.getElementsByTagName("id6");
							x7 = xmlDoc.getElementsByTagName("id7");//dateEnd
							x8 = xmlDoc.getElementsByTagName("id8");//nameMac
							//alert(x3[0].childNodes[0].nodeValue);
						
							if (x3[0].childNodes[0].nodeValue == "นาย") {
								sex = "1";
							} else {
								sex = "0";
							}
							if (x2[0].childNodes[0].nodeValue == "เทคโนโลยีการยาง")
								subject = 0;
							else if (x2[0].childNodes[0].nodeValue == "เทคโนโลยีการประมง")
								subject = 1;
							else if (x2[0].childNodes[0].nodeValue == "คณิตศาสตร์ประยุกตร์")
								subject = 2;
							else if (x2[0].childNodes[0].nodeValue == "วิทยาศาสตร์การอาหารและโภชนาการ")
								subject = 3;
							else if (x2[0].childNodes[0].nodeValue == "เคมี-ชีววิทยา")
								subject = 4;
							else if (x2[0].childNodes[0].nodeValue == "เคมีอุตสาหกรรม")
								subject = 5;
							else if (x2[0].childNodes[0].nodeValue == "เทคโนโลยีการเกษตร")
								subject = 6;
							else if (x2[0].childNodes[0].nodeValue == "วิศวกรรมเคมี")
								subject = 7;
							else if (x2[0].childNodes[0].nodeValue == "ฟิสิกส์")
								subject = 8;
							else
								subject = 9;
							document.getElementById("name_st").value = x[0].childNodes[0].nodeValue;
							
							document.getElementById("sname_st").value = x4[0].childNodes[0].nodeValue;
							document.getElementById("Pre_st").selectedIndex = sex;
							document.getElementById("Se_class_st").selectedIndex = subject;
							document.getElementById("name_st").disabled = true;
							document.getElementById("sname_st").disabled = true;
							document.getElementById("Pre_st").disabled = true;
							document.getElementById("Se_class_st").disabled = true;
							if(xy==1){
							var i,txtlog="",txtbutlog="",log=0,ii=1,idro="";
							var txtbutadd="<td> </td><td><input type='button' value='เพิ่มเติม' onclick='addSub();' ></td>",txtadd = "<table id='box-table-Pro' ><tr><td></td><td><b>รายวิชา</b></td><td><b>หัวหน้าโครงการวิจัย</b></td></tr>";
							for (i = 1; i < x.length; i++) {
							if(x7[i-1].childNodes[0].nodeValue!="00"||x3[i].childNodes[0].nodeValue==" "){
								txtadd = txtadd + "<tr style='cursor:pointer;' onclick=\"$('#rad"+i+"').prop('checked',$('#rad"+i+"').is(':checked')? false:true);\">";
								txtadd = txtadd + "<td><input type='radio' id ='rad"+i+"' name='choid1' id='choid"+(ii+2)+"' value='"+(ii+2)+"'   ></td>";
								txtadd = txtadd + "<input id='idSubject1' type='hidden' name='subject' value='"+x[i].childNodes[0].nodeValue+"'>";
								txtadd = txtadd + "<input id='idSubject2' type='hidden' name='subject' value='"+x2[i].childNodes[0].nodeValue+"'>";
								txtadd = txtadd + "<input id='idPro' type='hidden' name='idPro[]' value='"+x5[i].childNodes[0].nodeValue+"'>";
								txtadd = txtadd + "<input id='idStu' type='hidden' name='idStu[]' value='"+x4[i].childNodes[0].nodeValue+"'>";
								txtadd = txtadd + "<td>" + x[i].childNodes[0].nodeValue + "</td>";
								txtadd = txtadd + "<td>" + x2[i].childNodes[0].nodeValue + "</td>";
								txtadd = txtadd + "</tr>";
								ii++;
								}
								else {
								
								if(i==1||idro!=x5[i].childNodes[0].nodeValue)
								txtlog = txtlog+"<table id='box-table-log' ><tr><td COLSPAN = '2'><b>รายวิชา:" + x[i].childNodes[0].nodeValue + "</b></td><td COLSPAN = '2'> <b>หัวหน้าโครงการวิจัย: " + x2[i].childNodes[0].nodeValue + "</b></td></tr><tr><td></td><td><b>ชื่อเครื่อง</b></td><td><b>เวลาบันทีกข้อมูล</b></td><td COLSPAN = '2'><b>สถานะ</b></td></tr>";
								txtlog=txtlog+"<tr style='cursor:pointer;' onclick=\"$('#che"+i+"').prop('checked',$('#che"+i+"').is(':checked')? false:true);\">"+"<td style='width:20px'><input type='checkbox' id ='che"+i+"' name='idtool[]' value='" + x3[i].childNodes[0].nodeValue + "'></td>" + "<td>" + x8[i-1].childNodes[0].nodeValue + "</td>"+ "<td>" + x6[i-1].childNodes[0].nodeValue + "</td>"+"<td>กำลังใช้    </td></tr>";
								//txt = txt + "<input type='hidden' name='idStu' value='" + x4[i].childNodes[0].nodeValue + "'>";
								txtbutlog="<td COLSPAN = '2'><img src='arrow_ltr.png'><input type='submit' value='log out' onclick='logout();' ></td><td><input type='button' value='เพิ่มเติม' onclick='addPro();' ></td>";
								$("#box-table-Mac ").hide("slow");
								//break;
								idro=x5[i].childNodes[0].nodeValue;
								log=1;
								txtLog="<input type='button' value='log out' onclick='addSub3();' >";
								}
							}
							txtadd = txtadd + "<tr>"+txtbutadd+"<td>"+txtLog+"</td></td></tr>";
							txtadd = txtadd + "</table>";
							document.getElementById('box-table-LPro').innerHTML = txtadd;
							if(log==1){
							txtlog = txtlog + "<tr>"+txtbutlog+"<td></td></tr>";
							txtlog = txtlog + "</table>";
							document.getElementById('box-table-Log').innerHTML = txtlog;
							$("#box-table-Log").show("slow");
							$("#box-table-LPro").hide("slow");
							}else{
							$("#box-table-LPro").show("slow");
							$("#box-table-Log").hide("slow");
							
							}
							
							
							
							xy=2;
							}
							//document.getElementById("box-table-addNPro").style.display="inline";
							$("#status").html('<input type="hidden" name="idHave" value="ever">');
							//document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
						}
					}
				}
				xmlhttp.open("GET", "getuser3.php?q=" + str, true);
				xmlhttp.send();
				
			} else if (xx == 2||xy==2) {
			if(xx==2){
				$("#box-table-addNPro").show("slow");
				xx = 1;
				}
				document.getElementById("name_st").value = "";
				document.getElementById("sname_st").value = "";
				document.getElementById("Pre_st").selectedIndex = 0;
				document.getElementById("class_st").selectedIndex = 0;
				document.getElementById("name_st").disabled = false;
				document.getElementById("sname_st").disabled = false;
				document.getElementById("Pre_st").disabled = false;
				document.getElementById("class_st").disabled = false;
				//document.getElementById("box-table-addNPro").style.display="none";
				if(xy==2){
							//document.getElementById('box-table-Log').innerHTML = "";
							$("#box-table-Log").hide("slow");
							xy=1;
							}
			}
		});
		});
	    


function codename(id) {
	
	if (id == 1) {
		document.form2.textbox1.disabled = false;
		document.form2.project2.disabled = true;
		document.form2.bproject.disabled = true;
		//document.form2.choid1..disabled=true;
	} else {
		document.form2.textbox1.disabled = true;
		document.form2.project2.disabled = false;
		document.form2.bproject.disabled = false;
		document.form2.project2.disabled = false;
	}
}
function textchoid() {
	document.getElementById("choid1").checked = true;
	document.form2.project2.disabled = true;
	document.form2.bproject.disabled = true;
}
function textchoid2() {
	document.getElementById("choid2").checked = true;
	document.form2.textbox1.disabled = true;
	document.form2.textbox2.disabled = true;
	
}
function addSub() {
	
		$("#box-table-addNPro").show("slow");
	
	$("#box-table-Mac ").show("slow");
}
function addPro() {
	//if (xz == 1) {
		$("#box-table-LPro").show("slow");
		$("#box-table-addNPro").hide("slow");
		$("#box-table-Log").hide("slow");
	//	xz = 2;
	//}
	$("#box-table-Mac ").show("slow");
}
function addSub3() {
	//if (xz == 1) {
		$("#box-table-LPro").hide("slow");
		$("#box-table-Log").show("slow");
		$("#box-table-addNPro").hide("slow");		

	//	xz = 2;
	//}
	$("#box-table-Mac ").hide("slow");
}
function logout(){
document.getElementById("form2").action="logout.php";
choidFalse=0;
choidMFalse=0;
}
function IsNumeric(sText, obj) {
	var ValidChars = "0123456789.";
	var IsNumber = true;
	var Char;
	for (i = 0; i < sText.length && IsNumber == true; i++) {
		Char = sText.charAt(i);
		if (ValidChars.indexOf(Char) == -1) {
			IsNumber = false;
		}
	}
	if (IsNumber == false) {
		alert("Only numberic value");
		obj.value = sText.substr(0, sText.length - 1);
	}
}
var choidFalse=1;
var choidMFalse=1;
function submit1() {
	
	
	var r = document.getElementsByName("choid1");
	var m = document.getElementsByName("choidMac[]");
        //alert(dd);
        var txetGroup;
        if(dd>0){
               txetGroup="<input type='hidden' name='dd' value='"+dd+"'>";
           for(i=0;i<=dd;i++){
              txetGroup=txetGroup+"<input type='hidden' name='userArr0[]' value='"+userArr[i][0]+"'>" ;
              txetGroup=txetGroup+"<input type='hidden' name='userArr0[]' value='"+userArr[i][1]+"'>";
              txetGroup=txetGroup+"<input type='hidden' name='userArr0[]' value='"+userArr[i][2]+"'>";
              txetGroup=txetGroup+"<input type='hidden' name='userArr0[]' value='"+userArr[i][3]+"'>";
              txetGroup=txetGroup+"<input type='hidden' name='userArr0[]' value='"+userArr[i][4]+"'>";
              txetGroup=txetGroup+"<input type='hidden' name='userArr0[]' value='"+userArr[i][5]+"'>";
               
           }
            document.getElementById("group").innerHTML =txetGroup;
       }else
       document.getElementById("group").innerHTML ="<input type='hidden' name='dd' value='"+dd+"'>";
	if(choidFalse==1)
	for (i = 0; i < r.length; i++) {
			if (r[i].checked == true) {
				//alert("คุณเลือก" + r[i].value);
				choidFalse=0;
			}
		}
	if(choidMFalse==1)
	for (i = 0; i < m.length; i++) {
			if (m[i].checked == true) {
				//alert("คุณเลือก" + r[i].value);
				choidMFalse=0;
			}
		
	}
	if(typeApply==1||typeApply==2)
	if (document.form2.id_st.value == "" || document.form2.id_st.value.length != 10) {
		if(document.form2.id_st.value == 1) {
		document.getElementById("name_st").disabled = false;
			document.getElementById("sname_st").disabled = false;
			document.getElementById("Pre_st").disabled = false;
			document.getElementById("class_st").disabled = false;
		return true;
		}
		alert("กรุณากรอกข้อมูลให้ครบถ้วน"); 
		document.form2.id_st.focus();
		return false;
		
	} else if (document.form2.name_st.value == "") {
		alert("กรุณากรอกชื่อของท่าน");
		document.form2.name_st.focus();
		return false;
	
	}
	else if (document.form2.sname_st.value == "") {
		alert("กรุณากรอกนามสกุลของท่าน");
		document.form2.sname_st.focus();
		return false;
	} else if(choidFalse==1){
		alert("กรุณาเลือกรายวิชา");
		return false;
	} else if(choidMFalse==1) {
		alert("กรุณาเลือกอุปกรณืทดลอง");
		return false;
	} else {
			} else {

		document.getElementById("name_st").disabled = false;
			document.getElementById("sname_st").disabled = false;
			document.getElementById("Pre_st").disabled = false;
			document.getElementById("class_st").disabled = false;
			return true;
	}//else if (document.form2.sname_st.value == "")
}
var txtId;
function userf(user) {
chengType=user;

	if (user == "1") {
		txtId="รหัสนักศึกษา";
		document.getElementById("tags").type="input";
		document.getElementById("preName2").style.display="inline";
		document.getElementById("preName").style.display="none";
		document.getElementById("class_st3").style.display="none";
		document.getElementById("class_st2").style.display="none";
		document.getElementById("class_st").style.display="inline";
		document.getElementById("TdIdSt").style.display="table-row";
		document.getElementById('nameid').innerHTML = txtId;
	} else if (user == "2") {
		txtId="รหัสนักศึกษา";
		document.getElementById("tags").type="input";
		document.getElementById("TdIdSt").style.display="table-row";
		document.getElementById("preName2").style.display="inline";
		document.getElementById("class_st2").style.display="inline";
		document.getElementById("class_st").style.display="none";
		document.getElementById("class_st3").style.display="none";
		document.getElementById("preName").style.display="none";
		document.getElementById('nameid').innerHTML = txtId;
	} else if(user == "3"){
		document.getElementById("tags").type="hidden";
		document.getElementById("TdIdSt").style.display="none";
		document.getElementById("preName2").style.display="none";
		document.getElementById("preName").style.display="inline";
                document.getElementById("class_st2").style.display="none";
                document.getElementById("class_st").style.display="none";
                document.getElementById("class_st3").style.display="inline";
	}
	
}
var chengType;
function userf2(user) {
	
	if (chengType == "1") {
		txtId="รหัสนักศึกษา";
		document.getElementById("tags").type="input";
		document.getElementById("preName22").style.display="inline";
		document.getElementById("preName12").style.display="none";
		document.getElementById("class_st32").style.display="none";
		document.getElementById("class_st22").style.display="none";
		document.getElementById("class_st12").style.display="inline";
		document.getElementById("TdIdSt2").style.display="table-row";
		document.getElementById('nameid2').innerHTML = txtId;
	} else if (chengType == "2") {
		txtId="รหัสนักศึกษา";
		document.getElementById("tags").type="input";
		document.getElementById("TdIdSt2").style.display="table-row";
		document.getElementById("preName22").style.display="inline";//คำนำหน้า
		document.getElementById("class_st22").style.display="inline";
		document.getElementById("class_st12").style.display="none";
		document.getElementById("class_st32").style.display="none";
		document.getElementById("preName22").style.display="none";
		document.getElementById('nameid2').innerHTML = txtId;
	} else if(chengType == "3"){
		document.getElementById("tags").type="hidden";
		document.getElementById("TdIdSt2").style.display="none";
		document.getElementById("preName22").style.display="none";
		document.getElementById("preName12").style.display="inline";
                document.getElementById("class_st22").style.display="none";
                document.getElementById("class_st12").style.display="none";
                document.getElementById("class_st32").style.display="inline";
	}
	
}
function showFormName(showName) {
	if (showName == 0) {
		$("#formName").slideToggle("slow");
	} else {
		$("#formName").slideToggle("fast");
		
                cleardata();
		$("#formName").slideToggle("slow");
	}
}
var togFormName=0;
var showName=0;
var typeApply;
function cleardata(){
    document.getElementById("tags").value = "";
    document.getElementById("name_st").value = "";
    document.getElementById("sname_st").value = "";
    document.getElementById("Pre_st1").selectedIndex = 0;
    document.getElementById("Se_class_st").selectedIndex = 0;
    document.getElementById("name_st").disabled = false;
    document.getElementById("sname_st").disabled = false;
    document.getElementById("Pre_st1").disabled = false;
    document.getElementById("Se_class_st").disabled = false;
    if (xx == 1) {
    addSub();
            $("#box-table-addNPro").show("slow");
            $("#box-table-LPro").hide("slow");
            $("#box-table-Log").hide("slow");

            xx = 2;
            }
    txtLog="";
    
    
    
}
function typeUser(user) 
            {
                  typeApply=user;
                  switch (user) {
                      case "1":
                          
                          
                          if (togFormName == 1)
                              break;
                          $('#radioName1').prop('checked',$('#radioName1').is(':checked')? false:true);
                         // cleardata();
                          togFormName = 1;
                          userf(1);
                          
                          showFormName(showName);
                          break;
                      case "2":
                          if (togFormName == 2)
                              break;
                          $('#radioName2').prop('checked',$('#radioName2').is(':checked')? false:true);
                          //cleardata();
                          togFormName = 2;
                          userf(2);
                          
                          showFormName(showName);
                          break;
                      case "3":
                          if (togFormName == 3)
                              break;
                          //cleardata();
                          $('#radioName3').prop('checked',$('#radioName3').is(':checked')? false:true);
                          togFormName = 3;
                          userf(3);
                         
                          showFormName(showName);
                          break;
                  }
                  showName = 1;
                
            }
                            //carlendar
$(function(){
	var dateBefore=null;
	$("#dateupdate").datepicker({
		dateFormat: 'dd-mm-yy',
		showOn: 'button',
		buttonImage: 'http://jqueryui.com/demos/datepicker/images/calendar.gif',
		buttonImageOnly: true,
		dayNamesMin: ['อา', 'จ', 'อ', 'พ', 'พฤ', 'ศ', 'ส'], 
		monthNamesShort: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน','กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
		changeMonth: true,
		changeYear: true ,
		beforeShow:function(){
			if($(this).val()!=""){
				var arrayDate=$(this).val().split("-");		
				//arrayDate[2]=parseInt(arrayDate[2])-543;
				$(this).val(arrayDate[0]+"-"+arrayDate[1]+"-"+arrayDate[2]);
			}
			setTimeout(function(){
				$.each($(".ui-datepicker-year option"),function(j,k){
					var textYear=parseInt($(".ui-datepicker-year option").eq(j).val());
					$(".ui-datepicker-year option").eq(j).text(textYear);
				});				
			},50);

		},
		onChangeMonthYear: function(){
			setTimeout(function(){
				$.each($(".ui-datepicker-year option"),function(j,k){
					var textYear=parseInt($(".ui-datepicker-year option").eq(j).val());
					$(".ui-datepicker-year option").eq(j).text(textYear);
				});				
			},50);		
		},
		onClose:function(){
			if($(this).val()!="" && $(this).val()==dateBefore){			
				var arrayDate=dateBefore.split("-");
				//arrayDate[2]=parseInt(arrayDate[2])+543;
				$(this).val(arrayDate[0]+"-"+arrayDate[1]+"-"+arrayDate[2]);	
			}		
		},
		onSelect: function(dateText, inst){ 
			dateBefore=$(this).val();
			var arrayDate=dateText.split("-");
			//arrayDate[2]=parseInt(arrayDate[2])+543;
			$(this).val(arrayDate[0]+"-"+arrayDate[1]+"-"+arrayDate[2]);
		}

	});
	
});
//function userArray(xx,yy,Value){
//			userArr[dd][0]=document.getElementById("tags").value ;
//			userArr[dd][1]=document.getElementById("name_st").value ;
//			userArr[dd][2]=document.getElementById("sname_st").value ;
//			userArr[dd][3]=document.getElementById("Pre_st").value ;
//			userArr[dd][4]=document.getElementById("Se_class_st").value;
//			userArr[dd][5]=document.getElementById("idSubject1").value;
//			userArr[dd][6]=document.getElementById("idSubject2").value;
//			userArr[dd][7]=document.getElementById("idPro").value;
//			userArr[dd][8]=document.getElementById("idStu").value;
//
//
//
//
//}
function listGroup(group){
		if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp = new XMLHttpRequest();
				} else { // code for IE6, IE5
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp.onreadystatechange = function () {
					if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
						xmlDoc = xmlhttp.responseXML;
						var id1x = xmlDoc.getElementsByTagName("id1");
						var id1y = id1x[0].childNodes[0].nodeValue;
							x = xmlDoc.getElementsByTagName("id1"); //id
							x2 = xmlDoc.getElementsByTagName("id2"); //Pre_st
							x3 = xmlDoc.getElementsByTagName("id3"); //name_st
							x4 = xmlDoc.getElementsByTagName("id4"); //sname_st
							x5 = xmlDoc.getElementsByTagName("id5");//id_st
							x6 = xmlDoc.getElementsByTagName("id6");//class_st
							x7 = xmlDoc.getElementsByTagName("id7");//type
							sex=preName(x3[0].childNodes[0].nodeValue);
							subject=Class(x2[0].childNodes[0].nodeValue );
							document.getElementById("name_st").value = x[0].childNodes[0].nodeValue;
							
							userArr[dd][0]=x[0].childNodes[0].nodeValue;
							userArr[dd][1]=x3[0].childNodes[0].nodeValue;
							$("#textTab"+dd).text(x3[0].childNodes[0].nodeValue);
							userArr[dd][2]=x4[0].childNodes[0].nodeValue;
							userArr[dd][3]=x2[0].childNodes[0].nodeValue;
							userArr[dd][4]=x6[0].childNodes[0].nodeValue;
							
							
					}
				}
				xmlhttp.open("GET", "getuser4.php?q=" + group, true);
				xmlhttp.send();
    
    
    
    
    
}
function changetab(tab){
		if(c!=tab){
		  numc=tab;
			c=a;
			a=b;
			b=c;
			//$("ul#detail_containTab > li").eq(menuIndex).show('slide', {direction: 'right'}, 500)});
			$(".detailContent1").hide('slide', {direction: 'left'}, 500);
		
					//setUser(tab);
			$(".detailContent1").show('slide', {direction: 'right'}, 500);
			//userf2(chengType);
			
			if(numc<=numd)		
					setUser(tab);
					else {
					numc=tab;
					numd=tab;
					}
			c=tab;//เพื่อป้องกันtabสั้งซ้อน
			}
}
function setUser(index){
window.setTimeout(function () {
    $("#element").html('&nbsp;');

	$("#sname_st").val(userArr[index][2]);
	sex=preName(userArr[index][3]);
	$("#Pre_st1").prop("selectedIndex", sex);
	subject=Class(userArr[index][4]);
	$("#Se_class_st").prop("selectedIndex", subject);
	$("#name_st").val(userArr[index][1]);
	$("#tags").val(userArr[index][5]);
	}, 500);
	}
	
//real time
function preName(text){
	if (text == "นาย") {
			sex = "0";
		} else {
			sex = "1";
		}
		return sex;
	}
	function Class(classN){
	if (classN == "เทคโนโลยีการยาง")
		subject = 0;
	else if (classN == "เทคโนโลยีการประมง")
		subject = 1;
	else if (classN == "คณิตศาสตร์ประยุกตร์")
		subject = 2;
	else if (classN == "วิทยาศาสตร์การอาหารและโภชนาการ")
		subject = 3;
	else if (classN == "เคมี-ชีววิทยา")
		subject = 4;
	else if (classN == "เคมีอุตสาหกรรม")
		subject = 5;
	else if (classN == "เทคโนโลยีการเกษตร")
		subject = 6;
	else if (classN == "วิศวกรรมเคมี")
		subject = 7;
	else if (classN == "ฟิสิกส์")
		subject = 8;
	else
		subject = 9;
	
	return subject;
	}
$(function(){


	var nowDateTime=new Date("<?=date("m/d/Y H:i:s")?>");
	var d=nowDateTime.getTime();
	var mkHour,mkMinute,mkSecond;
        
	 setInterval(function(){
		d=parseInt(d)+1000;
		var nowDateTime=new Date(d);
		mkHour=new String(nowDateTime.getHours());  
		if(mkHour.length==1){  
			mkHour="0"+mkHour;  
		}
		mkMinute=new String(nowDateTime.getMinutes());  
		if(mkMinute.length==1){  
			mkMinute="0"+mkMinute;  
		} 		 
		mkSecond=new String(nowDateTime.getSeconds());  
		if(mkSecond.length==1){  
			mkSecond="0"+mkSecond;  
		} 	
		var runDateTime=mkHour+":"+mkMinute+":"+mkSecond;		 
		$("#dateupdate2").val(runDateTime);	 
	 },1000);


});
</SCRIPT>
<meta name="Generator" content="FreshHTML v3.70"></meta>
</head>
<body>
    <form method="post" id="form2" action="addpreocess.php" name="form2" onSubmit="JavaScript:return submit1();">
        <div id="tableTop">
            <div id='DivA'></div>
        </div>
        <center>
            <table id="box-table-a" cellspacing="0" cellpadding="0" margin="0">
                <tr>
                    <td>วัน/เดือน/ปี </td>
                    <td>
                        <input id="dateupdate" name="dateupdate" type="text" value="<?php echo date("d-m-Y ");?>">
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td>เวลา</td>
                    <td>
                        <input id="dateupdate2" name="dateupdate2" type="text" value="<?php echo date("
                        H:i:s ");?>">
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td style="cursor:pointer;" onclick="typeUser('1');">
                        <input id="radioName1" type="radio" name="type" value='1' onclick="typeUser(this.value);">นักศึกษาปริญญาตรี</td>
                    <td style="cursor:pointer;" onclick="typeUser('2');">
                        <input id="radioName2" type="radio" name="type" value='2' onclick="typeUser(this.value);">นักศึกษาปริญญาโท</td>
                    <td style="cursor:pointer;" onclick="typeUser('3');">
                        <input id="radioName3" type="radio" name="type" value='3' onclick="typeUser(this.value);">อาจารย์/บุคลากรทั่วไป</td>
                </tr>
            </table>
                
            <div id="formName">
                <table id=box-table-tabapply>
                    <tr>
                        <td colspan="3">   
                    <div id="i_containTab"  style="display: none;">
                        <ul id="navi_containTab">
                            <li class="tabNavi1"><div id=textTab0>user</div></li>
                        </ul>
                        <ul id="navi_containTab2">
                            <li class="tabNavi2">เพิ่ม</li>
                        </ul>
                    </div>
					<div id="group"  style="display: none;">
					<table id="box-table-group">
					<th>เพิ่มรายชื่องานกลุ่ม</th>
					<tr>
						
						<td id="menuGroup"> เพิ่มสมาชิกกลุ่มใหม่</td>
					</tr>
					
					</table>
					</div>
					</td>
                    </tr>
				<tr >
				<td colspan="3">
				<ul id="detail_containTab">
        <li class="detailContent1">
				<table id=box-table-a>
                    <tr id="TdIdSt">
                        <td><a id="nameid">รหัสนักศึกษา</a>
                        </td>
                        <td>
                            <input id="tags" name="id_st" type="text" autocomplete="off" onKeyUp="IsNumeric(this.value,this)">
                        </td>
                        <td>
                            <div id="status"></div>
                        </td>
                    </tr>
                    <tr>
                        <td>คำนำหน้า</td>
                        <td  >
                            <div id="preName">
                                <select  name="Pre_st" id="Pre_st">
                                    <option value="นาย">ศ.</option>
                                    <option value="นาย">ผศ.</option>
                                    <option value="นาย">ว่าที่ร้อยตรี</option>
                                    <option value="นาย">นาย</option>
                                    <option value="นางสาว">นางสาว</option>
                                    <option value="นางสาว">นาง</option>
                                </select>
                            </div>
                            <div id="preName2">
                                <select   name="Pre_st" id="Pre_st1">
                                    <option value="นาย">นาย</option>
                                    <option value="นางสาว">นางสาว</option>
                                    <option value="นางสาว">นาง</option>
                                </select>
                            </div>
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>ชื่อ</td>
                        <td>
                            <!--<div id="txtHint">-->
                            <input name="Bame_st" id="name_st"  autocomplete="off" type="text" value="">
                            <!--</div>-->
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>สกุล</td>
                        <td>
                            <input name="sname_st" id="sname_st" type="text">
                        </td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>สาขาวิชา</td>
                        <td>
                            <div id='class_st' >
                                    <select name="class_st" id="Se_class_st" width="200">
                                        <option value="เทคโนโลยีการยาง">เทคโนโลยีการยาง</option>
                                        <option value="เทคโนโลยีการประมง">เทคโนโลยีการประมง</option>
                                        <option value="คณิตศาสตร์ประยุกตร์">คณิตศาสตร์ประยุกตร์</option>
                                        <option value="วิทยาศาสตร์การอาหารและโภชนาการ">วิทยาศาสตร์การอาหารและโภชนาการ</option>
                                        <option value="เคมี-ชีววิทยา">เคมี-ชีววิทยา</option>
                                        <option value="เคมีอุตสาหกรรม">เคมีอุตสาหกรรม</option>
                                        <option value="เทคโนโลยีการเกษตร">เทคโนโลยีการเกษตร</option>
                                        <option value="วิศวกรรมเคมี">วิศวกรรมเคมี</option>
                                        <option value="ฟิสิกส์">ฟิสิกส์</option>
                                        <option value="วิทยาศาสตร์นิเทศ">วิทยาศาสตร์นิเทศ</option>
                                        <option >//คณะศึกษาศาสตร์//</option>
                                    </select>
                            </div>
                            <div id='class_st2' >
                                    <select name="class_st" id="Se_class_st" width="200">
                                        <option value="เทคโนโลยีการยาง">เทคโนโลยีการยาง</option>
                                        <option value="เทคโนโลยีการประมง">เทคโนโลยีการประมง</option>
                                        <option value="คณิตศาสตร์ประยุกตร์">คณิตศาสตร์ประยุกตร์</option>
                                        <option value="วิทยาศาสตร์การอาหารและโภชนาการ">วิทยาศาสตร์การอาหารและโภชนาการ</option>
                                        <option value="เคมี-ชีววิทยา">เคมี-ชีววิทยา</option>
                                        <option value="เคมีอุตสาหกรรม">เคมีอุตสาหกรรม</option>
                                        <option value="เทคโนโลยีการเกษตร">เทคโนโลยีการเกษตร</option>
                                        <option value="วิศวกรรมเคมี">วิศวกรรมเคมี</option>
                                        <option value="ฟิสิกส์">ฟิสิกส์</option>
                                        <option value="วิทยาศาสตร์นิเทศ">วิทยาศาสตร์นิเทศ</option>
                                    </select>
                                </div>
                            <div id='class_st3' >
                                <input name="Bame_st" id="class_st3"   type="text" value="">
                            </div>
                        </td>
                        <td></td>
                    </tr>
                    
                </table>
				
				</li>
				</ul>
				</td>
				</tr>
					</table>
            </div>
            <div id="box-table-Log"></div>
            <div id="box-table-LPro"></div>
            <div id="box-table-addNPro">
                <table id="box-table-c">
                    <tr>
                        <td>
                            <input type="radio" name="choid1" id="choid1" value="1" onclick="codename(this.value);">รายวิชา</td>
                        <td>
                            <input type="text" name="textbox1" onclick="textchoid();">
                        </td>
                        <td>ชื่อวิชา</td>
                        <td>
                            <input type="text" name="textbox2" onclick="textchoid();">
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="radio" id="choid2" name="choid1" value="2" onclick="codename(this.value);">งานวิจัย</td>
                        <td>
                            <input name="project2" type="text" value="" onclick="textchoid2();">
                        </td>
                        <td>หัวหน้าโครงการวิจัย</td>
                        <td>
                            <input name="bproject" type="text" value="" onclick="textchoid2();">
                        </td>
                    </tr>
                </table>
            </div>
            <?php include 'new6.php'; ?>
            <table id="box-table-Mac">
                <tr>
                    <td>
                        <center>
                            <input type="submit" name="submit" value="บันทึก" /><input type="button" name="cancel" value="ยกเลิก" onclick="window.location='assa.php'; "/> <a href="view.php">view.php</center></a>

                    </td>
                </tr>
            </table>
            <div id="group"></div>
            </center>
    </form>
<!--	<div class='jqbox_innerhtml'>Popup content</div>-->
</body>

</html>